package stany;
import java.awt.Color;

import stany.deksryptor.StanDrapieznika;



public class PredatorState implements State{

	@Override
	public Color randomState() {
		StanDrapieznika[] stany = StanDrapieznika.values();
		return stany[ran.nextInt(stany.length)].getColor();
	}

	@Override
	public Color deadState() {
		return StanDrapieznika.ZIEMIA.getColor();
	}

	@Override
	public Color[] getAvailableColors() {
		StanDrapieznika[] stany = StanDrapieznika.values();
		Color[] colors = new Color[stany.length];
		
		for(int i = 0; i < colors.length;i++ ){
			colors[i] = stany[i].getColor(); 
		}
		return colors;
	}

	@Override
	public String[] getDescriptions() {
		StanDrapieznika[] stany = StanDrapieznika.values();
		String[] opisy = new String[stany.length];
		for(int i =0; i < stany.length; i++){
			opisy[i] = stany[i].getDescr();
		}
		return opisy;
	}
	

}

